﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using BUS;
using DTO;

namespace QuanLyNhaSach
{
    public partial class frmLogin : DevComponents.DotNetBar.Office2007Form
    {
        public frmLogin()
        {
            InitializeComponent();
        }
        
        private void btnThoat_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            if (txtUsername.Text == "")
            {
                MessageBoxEx.Show("Bạn chưa nhập Username", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                if (txtPassword.Text == "")
                {
                    MessageBoxEx.Show("Bạn chưa nhập Password", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                else
                {
                    frmMain frm = new frmMain();
                    frm.ShowDialog();
                    this.Close();
                }
            }
        }

        private void lbLayLaiPass_Click(object sender, EventArgs e)
        {
            frmLayLaiPass frm = new frmLayLaiPass();
            frm.Show();
            this.Hide();
        }
    }
}